package com.registry.client.config;

import com.config.client.config.HbzBeanDefinitionRegistry;
import com.config.client.config.RefreshScope;
import com.config.client.server.ConfigServer;
import com.config.client.springevent.SpringConfigStartEvent;
import com.registry.client.service.RegistryService;
import com.registry.client.springevent.SpringCloseEvent;
import com.registry.client.springevent.SpringStartEvent;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CloudConfig {

    @Bean
    public RegistryCentreConfig registryCentreConfig(){
       return new RegistryCentreConfig();
    }

    @Bean
    public ServerConfig serverConfig(){
        return new ServerConfig();
    }

    @Bean
    public ServerNameConfig serverNameConfig(){
        return new ServerNameConfig();
    }

    @Bean
    public RegistryService registryService(){
        return new RegistryService();
    }

    @Bean
    public SpringCloseEvent springCloseEvent(){
        return new SpringCloseEvent();
    }

    @Bean
    public SpringStartEvent springStartEvent(){
        return new SpringStartEvent();
    }

    @Bean
    public SpringConfigStartEvent springConfigStartEvent(){
        return new SpringConfigStartEvent();
    }

    @Bean
    public ConfigServer configServer(){
        return new ConfigServer();
    }

    @Bean
    public HbzBeanDefinitionRegistry hbzBeanDefinitionRegistry(){
        return new HbzBeanDefinitionRegistry();
    }

    @Bean
    public RefreshScope refreshScope(){
        return new RefreshScope();
    }

}
